home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / zcpp_jae.zip / SAMPLES.MAK < prev    next >
Makefile  |  1992-07-14  |  2KB  |  68 lines

  1. # Samples.mak
  2. # -----------
  3. # This makefile compiles the programs samples.cpp and tempsamp.cpp.
  4. # samples.cpp contains some template code that I tested using the ``cpp''
  5. # preprocessor.  tempsamp.cpp is the tempsample.c file that came with
  6. # the Texas Instruments package.
  7. #
  8. # The purpose of this makefile is to produce ``.lst'' files.  These files
  9. # will show the output of the ``cpp'' processor.  A secondary purpose for
  10. # this makefile is to demonstrate how the ``cpp'' processor might be
  11. # incorporated into a makefile for regular use.
  12. #
  13. # This makefile is designed for use with the Zortech C++ compiler, linker,
  14. # and make utility.
  15. #
  16. # Guy C. Gallant, 27Apr91
  17.  
  18.  
  19. # General purpose macros.
  20. # -----------------------
  21. # assume ztc and cpp are on the path somewhere.
  22. CC = ztc -c
  23. CPP = cpp.exe
  24. TMPNAME = temppmet.tem
  25.  
  26. # cpp will look in multiple directories
  27. # only if multiple -I switches are given.
  28. # (now imported from INCLUDE env variable)
  29. #INC_DIR = -Ic:\zortech\include
  30.  
  31. # another include directory for cpp.
  32. ALT_INC =
  33.  
  34. # additional compiler flags.
  35. CFLAGS = -b
  36.  
  37. # Uncomment as necessary.
  38. # -----------------------
  39. # Large model.
  40. #MODEL= -ml
  41.  
  42. # Small model.
  43. MODEL = -ms
  44.  
  45. # Rules
  46. # -----
  47. .c.obj:
  48.     $(CPP) $(MODEL) $(INC_DIR) $(ALT_INC) $< $(TMPNAME)
  49.     $(CC) $(MODEL) $(CFLAGS) -l$*.lst -o$@ $(TMPNAME)
  50.     -@del $(TMPNAME) >nul
  51.  
  52. .cpp.obj:
  53.     $(CPP) -D__cplusplus $(MODEL) $(INC_DIR) $(ALT_INC) $< $(TMPNAME)
  54.     $(CC) -cpp $(MODEL) $(CFLAGS) -l$*.lst -o$@ $(TMPNAME)
  55.     -@del $(TMPNAME) >nul
  56.  
  57.  
  58. # Targets
  59. # -------
  60. # Create objects so we can look at the list files.
  61.  
  62. all: samples.obj incl.obj tempsamp.obj
  63.  
  64. incl.obj: incl.cpp
  65. samples.obj: samples.cpp
  66. tempsamp.obj: tempsamp.cpp
  67.  
  68.